import React, { Component } from 'react'
import { Select } from 'antd'

export default class AntSelect extends Component {
    render() {
        const { title, data, onSelect, defaultValue, value } = this.props

        return (
            <>
                <span>{title} </span>
                <Select
                    defaultValue={defaultValue}
                    style={{
                        width: 120,
                    }}
                    onChange={onSelect}
                    options={data}
                    value={value}
                />
            </>
        )
    }
}